package com.gisuni.sddc.platformManager.model;

import java.util.Date;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;




/**
 * RoleRResourceId entity. @author MyEclipse Persistence Tools
 */
@Table(value = "SDDCGISPLATFORM.ROLE_R_RESOURCE")
public class RoleRResource implements java.io.Serializable {

	// Fields
	@Column(value = "ID" )
	@Name
	private String id;
	
	@Column(value = "ROLE_ID" )
	
	private String roleId;
	
	@Column(value = "RESOURCE_ID" )
	
	private String resourceId;
	
	@Column(value = "CREATE_TIME" )
	
	private Date createTime;
	
	@Column(value = "UPDATE_TIME" )
	private Date updateTime;

	// Constructors

	/** default constructor */
	public RoleRResource() {
	}

	/** minimal constructor */
	public RoleRResource(String id, String roleId, String resourceId) {
		this.id = id;
		this.roleId = roleId;
		this.resourceId = resourceId;
	}

	/** full constructor */
	public RoleRResource(String id, String roleId, String resourceId,
			Date createTime, Date updateTime) {
		this.id = id;
		this.roleId = roleId;
		this.resourceId = resourceId;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	// Property accessors

	
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getRoleId() {
		return this.roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	
	public String getResourceId() {
		return this.resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}


	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	
	
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof RoleRResource))
			return false;
		RoleRResource castOther = (RoleRResource) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getRoleId() == castOther.getRoleId()) || (this
						.getRoleId() != null
						&& castOther.getRoleId() != null && this.getRoleId()
						.equals(castOther.getRoleId())))
				&& ((this.getResourceId() == castOther.getResourceId()) || (this
						.getResourceId() != null
						&& castOther.getResourceId() != null && this
						.getResourceId().equals(castOther.getResourceId())))
				&& ((this.getCreateTime() == castOther.getCreateTime()) || (this
						.getCreateTime() != null
						&& castOther.getCreateTime() != null && this
						.getCreateTime().equals(castOther.getCreateTime())))
				&& ((this.getUpdateTime() == castOther.getUpdateTime()) || (this
						.getUpdateTime() != null
						&& castOther.getUpdateTime() != null && this
						.getUpdateTime().equals(castOther.getUpdateTime())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getRoleId() == null ? 0 : this.getRoleId().hashCode());
		result = 37
				* result
				+ (getResourceId() == null ? 0 : this.getResourceId()
						.hashCode());
		result = 37
				* result
				+ (getCreateTime() == null ? 0 : this.getCreateTime()
						.hashCode());
		result = 37
				* result
				+ (getUpdateTime() == null ? 0 : this.getUpdateTime()
						.hashCode());
		return result;
	}

}